package com.example.servlet.student.tmp;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @program: sms
 * @description:
 * @author: zhanghz001
 * @create: 2020-10-30 19:42
 **/
public class HttpStudentServlet extends HttpServlet {
    private int currentPage = 1;

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("书名: " + req.getParameter("bookName") + " 页码为: " + ++currentPage);
        System.out.println("这是一个寂寞的天,下着有些伤心的雨");
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        doGet(req, resp);
    }
}
